/************************************************************************
                        RequestData.h.cpp 


*/
#include "RequestData.h"
// Ctor/Dtor
RequestData::RequestData (int type):Request(type) {}
RequestData::~RequestData () {}

string RequestData::getParameter(string column)const
{
		if (m_Parameters.find(column) == m_Parameters.end()) return "";
		return (m_Parameters.find(column))->second;
}
void RequestData::addParameter(string columnName,string data)
{
	try{
	m_Parameters[columnName]=data;
	}catch(...){throw;}
}

void RequestData::print_parameters()
{	
	ParamList::iterator p_iter;
	int cur_row=0;
	for(p_iter=m_Parameters.begin();p_iter!=m_Parameters.end();p_iter++)
		cout<<setw(13)<<p_iter->first<<"|";
		cout<<endl;
	for(p_iter=m_Parameters.begin();p_iter!=m_Parameters.end();p_iter++)
		cout<<setw(13)<<p_iter->second<<"|";
		cout<<endl;
}
